package tpl

var Tpl = `package migration

import (
	"fmt"
	"migrate/app/migrate"

	"gorm.io/gorm"
)

func init() {
	migrate.AddMigration(&migrate.Migration{
		Version: "m_{{.Version}}_{{.Name}}",
		Up:      m_{{.Version}}_{{.Name}}_up,
		Down:    m_{{.Version}}_{{.Name}}_down,
	})
}

func m_{{.Version}}_{{.Name}}_up(db *gorm.DB) error {
	fmt.Println("m_{{.Version}}_{{.Name}}_up")
	return nil
}

func m_{{.Version}}_{{.Name}}_down(db *gorm.DB) error {
	fmt.Println("m_{{.Version}}_{{.Name}}_down")
	return nil
}
`
